﻿
using Base.ClientUI;
 
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
 namespace Base.ClientUI {
    public class HttpParam {
        static public bool UpdateCraneOverStop(int CraneId,int value)
        {
            JValue data = WCSHttpUtil.getJValue(WCSHttpUtil.baseUrl + "param/updateCraneOverStop/" + CraneId + "/" + value);
            if (data == null)
            {
                return false;
            }
            return bool.Parse(data.ToString());
        }
        static public bool UpdateParam(string driveType ,string driveId ,string key ,string value) {//updateParam/{driveType}/{driveId}/{key}/{value}
             JValue data = WCSHttpUtil.getJValue(WCSHttpUtil.baseUrl + "param/updateParam/"+ driveType+"/" + driveId + "/" + key+ "/"+ value);
            if( data == null ) {
                return false;
            }
            return bool.Parse(data.ToString());
        }
       
        
         static public int GetCraneOverStop(int CraneId)
        {
            JValue data = WCSHttpUtil.getJValue(WCSHttpUtil.baseUrl + "param/GetCraneOverStop/" + CraneId);
            if (data == null)
            {
                return 3;
            }
            return int.Parse(data.Value.ToString());
        }
       
       
        
       }
}
